
/**
 */
function initEchartsYJQS(id, data) {
	// 处理yaxisIndex
	for (var i = 0; i < data.series.length; i++) {
		data.series[i]['yAxisIndex'] = data.series[i]['yaxisIndex'];
	}
	
	const colors = ['#5470C6', '#91CC75', '#EE6666'];
	var option = {
	  color: colors,
	  tooltip: {
	    trigger: 'axis',
	    axisPointer: {
	      type: 'cross'
	    }
	  },
	  grid: {
			left: '2%',
			right: '2%',
			bottom: '2%',
		    containLabel: true
	  },
	  toolbox: {
	    feature: {
	      dataView: { show: false, readOnly: false },
	      restore: { show: false },
	      saveAsImage: { show: false }
	    }
	  },
	  legend: data.legend,
	  /*
	  {
	    data: ['销售金额', '右边Y轴曲线图']
	  },
	  */
	  xAxis: [
	    {
	      type: 'category',
	      axisTick: {
	        alignWithLabel: true
	      },
	      // prettier-ignore
	      data: data.xdataArr // X轴数组
	      //data: ['类别1', '类别2', '类别3', '类别4']
	    }
	  ],
	  yAxis: [
	    {
	      type: 'value',
	      name: '金额',
	      position: 'left',
	      alignTicks: true,
	      axisLine: {
	        show: true,
	        lineStyle: {
	          color: colors[0]
	        }
	      },
	      axisLabel: {
	        formatter: '{value}'
	      }
	    },
	    {
	      type: 'value',
	      name: '数量',
	      position: 'right',
	      alignTicks: true,
	      offset: 0,
	      axisLine: {
	        show: true,
	        lineStyle: {
	          color: colors[1]
	        }
	      },
	      axisLabel: {
	        formatter: '{value}'
	      }
	    }
	  ],
	  series: data.series
	  /*
	  [
	    {
	      name: '销售金额',
	      type: 'line',
	      data: [2.0, 4.9, 7.0, 23.2, 23.2, 23.2, 23.2]
	    },
	    {
	      name: '右边Y轴曲线图',
	      type: 'line',
	      yAxisIndex: 1,
	      data: [6.9, 5.9, 9.0, 26.4, 26.4, 26.4, 26.4]
	    }
	  ]
	  */
	};
	echarts.init(document.getElementById(id)).setOption(option, true);
}